<?php
session_start();
date_default_timezone_set('UTC');
error_reporting(CONST_ERROR);

require_once CONST_LIBARY.'adodb/adodb.inc.php';
require_once CONST_LIBARY.'adodb/adodb-pager.inc.php';
require_once CONST_LIBARY.'adodb/toexport.inc.php';

$objConn = &ADONewConnection(CONST_DB_TIPOBANCO);
$objConn->PConnect(CONST_DB_SERVER,CONST_DB_USER,CONST_DB_PASSWORD,CONST_DB_DATABASE);

$objConn->query('SET names UTF8');

$objConn->pageExecuteCountRows = CONST_COUNTROWS;
$objConn->debug = CONST_DEBUG;

$objError = new showErro( $objConn );

function __autoload($class)
{
	require_once("modulos/class/".$class.".php");
}

function dateToBd( $data ){
	if ( $data != '' ){
		$arrData = explode('/', $data); // 01/12/2011
		return $arrData[2].'-'.$arrData[1].'-'.$arrData[0];
	}	
}